#include "RandomGenerator.h"
#include "include/ITimerManager.h"
#include "include/ILog.h"
#include <cstdlib>

CRandomGenerator::CRandomGenerator()
{
	Start();
	pLogRelease << "RandomGenerator created..." << endl;
}

CRandomGenerator::~CRandomGenerator()
{
}

void CRandomGenerator::Start()
{
    srand(TimeManager->GetActualTime());
}

s32 CRandomGenerator::GetRandomNumber(s32 Max, s32 Min)
{
    s32 Distance = Max - Min;
    s32 Number = rand()%Distance;
    Number += Min;
    return Number;
}
